From: Daniel Carl <danielcarl@gmx.de>
Date: Tue, 13 Jun 2017 20:41:27 +0000 (+0200)
Subject: Keep xid generation and setting to env close together.
X-Git-Url: https://git.owens.tech/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/assets/lich_lifts_title_slice.png%20%22Lich%20Lifts%22/git?a=commitdiff_plain;h=d95c36a881fa2309243c6c56e0416842f5d60e59;p=vimb.git

Keep xid generation and setting to env close together.
---

diff --git a/src/main.c b/src/main.c
index 7586f0c..5d01268 100644
--- a/src/main.c
+++ b/src/main.c
@@ -683,6 +683,10 @@ static Client *client_new(WebKitWebView *webview, gboolean show)
                 (int)GDK_WINDOW_XID(gtk_widget_get_window(GTK_WIDGET(c->window))));
     }
 
+    /* set the x window id to env */
+    g_setenv("VIMB_XID", xid, TRUE);
+    g_free(xid);
+
     completion_init(c);
     map_init(c);
 
@@ -736,10 +740,6 @@ static Client *client_new(WebKitWebView *webview, gboolean show)
             GTK_STYLE_PROVIDER(vb.style_provider),
             GTK_STYLE_PROVIDER_PRIORITY_APPLICATION);
 
-    /* set the x window id to env */
-    g_setenv("VIMB_XID", xid, TRUE);
-    g_free(xid);
-
     /* initialize the settings */
     setting_init(c);